using System.Collections.Generic;
using Wolfpack.Core;
using Wolfpack.Core.Configuration;
using Wolfpack.Core.Interfaces.Entities;
using Wolfpack.Core.Notification.Filters.Request;

namespace Wolfpack.Contrib.Checks.Smtp
{
    public class SmtpPingConfigurationDiscovery : HealthCheckDiscoveryBase<SmtpPingCheckConfig, SmtpPingCheck>
    {
        protected override SmtpPingCheckConfig GetConfiguration()
        {
            return new SmtpPingCheckConfig
                       {
                           Enabled = true,
                           FriendlyId = "SmtpPing",
                           NotificationMode = StateChangeNotificationFilter.FilterName,
                           Servers = new List<string> { "Add a server names here", "A.N.OtherServer" }
                       };
        }

        protected override void Configure(ConfigurationEntry entry)
        {
            entry.Name = "SmtpPing";
            entry.Description = "This check will ping a mail server(s) and if it does not receive a" +
                                "response to the SMTP HELO request it will report a failure alert.";
            entry.Tags.AddIfMissing("SMTP", "Ping");
        }
    }
}